package org.easystub.dbstub;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;

public class TableMetaData {

    private Map<String, Integer> columnMetaData = new LinkedHashMap<String, Integer>();
    private final String tableName;

    public TableMetaData(String tableName) {
        this.tableName = tableName;
    }

    public void addColumn(String name, int sqlType) {
        columnMetaData.put(name.toUpperCase(), sqlType);
    }

    public int getColumnType(String name) {
        return columnMetaData.get(name.toUpperCase());
    }

    @Override
    public String toString() {
        return tableName + columnMetaData.keySet();
    }
}
